//
//  ToolCount.swift
//  Library_y
//
//  Created by JC on 2023/6/6.
//

import Foundation

// MARK: - 计算相关工具
public extension Tools {
    
    /// 取出最大值
    static func maxOne<T: Comparable >(_ seq: [T]) -> T {
        assert(seq.count > 0)
        return seq.reduce(seq[0]){
            max($0, $1)
        }
    }
}
